Skip to content

Conversation

@sabiwara
Copy link
Contributor

@sabiwara sabiwara commented Jul 17, 2025

Closes #14655

But we need to check the optimization in __recv_opt_info__ isn't broken, I'm not sure how.

To be backported.

# exported only to avoid dialyzer opaqueness check in internal Task modules
@doc false
@spec build_alias(pid()) :: Task.ref()
def build_alias(pid) do
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
def build_alias(pid) do
def __alias__(pid) do

So it is not accidentally imported.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good call! Perhaps I could keep the defp build_alias too to avoid messing with the optimizations?

@sabiwara
Copy link
Contributor Author

Is this flake? 🤔
Screenshot 2025-07-18 at 6 31 48

@josevalim
Copy link
Member

But we need to check the optimization in recv_opt_info isn't broken, I'm not sure how.

Run ERL_COMPILER_OPTIONS=recv_opt_info elixir lib/elixir/lib/task.ex before and after compiling your changes and see if the result is the same. I checked locally and it is.

Is this flake? 🤔

Yes, I have been chasing it for a while now.

@sabiwara
Copy link
Contributor Author

I checked locally and it is.

Thx for checking!

I decided to still go with the private function, so that we keep the consistency with build_monitor.
Also __alias__ feels weird without the module name.

@sabiwara sabiwara merged commit c6ab1db into elixir-lang:main Jul 17, 2025
13 checks passed
@sabiwara sabiwara deleted the opaque-otp28 branch July 17, 2025 21:42
@sabiwara
Copy link
Contributor Author

Backported

ggVGc pushed a commit to ggVGc/elixir-verbatim that referenced this pull request Sep 12, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Dialyzer Warning in Task.Supervisor

2 participants